<%@page import="edu.uit.se.laps.web.model.TaiKhoan"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!-- pageEncoding="UTF-8"%> -->
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ page
	import="edu.uit.se.laps.web.*,edu.uit.se.laps.web.controller.*, java.net.*,java.text.*,java.util.*"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body,input {
	font-family: Calibri, Arial;
}

table#contact {
	border-collapse: collapse;
	width: 550px;
}

th {
	height: 40px;
	background-color: #ffee55;
}

.addsp {
	padding-top: 50px;
	padding-bottom: 100px;
}

.khungaddSP {
	width: 100%;
	background: #FFFFEB;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	-ms-border-radius: 10px;
	-o-border-radius: 10px;
	border-radius: 10px;
	box-shadow: 0px 0px 25px #808076;
}

h1{
	color: red;
	padding-top: 20px;
	margin-left: 20px;
}
ul{
	list-style-type: none;
}
ul a{
	width: 160px;
	display: inline-block;
}
textarea{
	max-width: 500px;
}

.taotk{
	background: red;
	height: 40px;
	color: white;
	font-size: 18px;
	cursor: pointer;
	border: none;	
	margin: 20px 20px;
}

.taotk:hover{
	background: #8F2400;
}
</style>
<title>myLife - Cập nhật thông tin khách hàng</title>

<s:head />
<!-- the s:head de thong bao loi validation -->
</head>
<body>
	<tiles:insertTemplate template="TemAdmin.jsp">
		<tiles:putAttribute name="adminFocus">
			<div class="addsp" align="left">
				<div class="khungaddSP">
					<%
						TaiKhoanSession tkSession = (TaiKhoanSession) session
										.getAttribute("TaiKhoanSession");
								if (tkSession == null) {
									tkSession = new TaiKhoanSession();
									session.setAttribute("TaiKhoanSession", tkSession);
								}
								TaiKhoan tk = tkSession.getTk();

								TaiKhoan tkTemp = tkSession.getTkTemp();
					%>
					<h1>CẬP NHẬT THÔNG TIN KHÁCH HÀNG</h1>
 
					<div style="color: red">${message}</div>
					<s:form action="updateUser" method="post">
						<ul>
							<li><a>Id User</a><label style="color: red">*</label> <input
								type="text" name="idUser" size="30" required="on"
								value='<%=tkTemp.getIdUser()%>' disabled="disabled" /></li>
							<li><a>Email</a><label style="color: red">*</label> <input
								type="email" name="email" size="30" required="on"
								value='<%=tkTemp.getEmail()%>' disabled="disabled" /></li>
							<li><a>Password</a><label style="color: red">*</label> <input
								type="password" name="password" size="30" required="on" /></li>
							<li><a>Họ Tên</a><label style="color: red">*</label> <input
								type="text" name="hoTen" size="30" required="on"
								value='<%=tkTemp.getHoTen()%>' /></li>

							<li><a>Giới Tính</a><label style="color: red">*</label> <select
								name="gioiTinh">
									<option value="0">Nam</option>
									<option value="1">Nữ</option>
							</select>
							</li>
							<li><a>Ngày Sinh</a><label style="color: red">*</label> <input
								type="date" name="ngaySinh" required="on"
								value='<%=tkTemp.getNgaySinh()%>'></li>
							<li><a>Điện Thoại</a><label style="color: red">*</label> <input
								type="text" name="dienThoai" size="11" required="on"
								value='<%=tkTemp.getDienThoai()%>' /></li>
							<li><a>Địa Chỉ</a><label style="color: red">*</label> <textarea
									name="diaChi" required="on" ><%=tkTemp.getDiaChi()%></textarea></li>
						</ul>
						<p>
							<input type="hidden" name="idUser" value='<%=tkTemp.getIdUser()%>' />
							<input type="hidden" name="email" value='<%=tkTemp.getEmail()%>' />
							<input class="taotk" type="submit" value="Cập nhật" />
						</p>
					</s:form>



				</div>
			</div>
		</tiles:putAttribute>
	</tiles:insertTemplate>

</body>
</html>